package org.apereo.cas.web.y9.event.message;

import java.util.HashMap;
import java.util.Map;

public class Y9OrgConst {

    // 事件类型
    public static final String RISEORGEVENT_TYPE_ADD_ORGANIZATION = "RISEORGEVENT_TYPE_ADD_ORGANIZATION";
    public static final String RISEORGEVENT_TYPE_ADD_DEPARTMENT = "RISEORGEVENT_TYPE_ADD_DEPARTMENT";
    public static final String RISEORGEVENT_TYPE_ADD_GROUP = "RISEORGEVENT_TYPE_ADD_GROUP";

    public static final String RISEORGEVENT_TYPE_ADD_POSITION = "RISEORGEVENT_TYPE_ADD_POSITION";
    public static final String RISEORGEVENT_TYPE_ADD_PERSON = "RISEORGEVENT_TYPE_ADD_PERSON";

    public static final String RISEORGEVENT_TYPE_UPDATE_ORGANIZATION = "RISEORGEVENT_TYPE_UPDATE_ORGANIZATION";
    public static final String RISEORGEVENT_TYPE_UPDATE_DEPARTMENT = "RISEORGEVENT_TYPE_UPDATE_DEPARTMENT";
    public static final String RISEORGEVENT_TYPE_UPDATE_GROUP = "RISEORGEVENT_TYPE_UPDATE_GROUP";

    public static final String RISEORGEVENT_TYPE_UPDATE_POSITION = "RISEORGEVENT_TYPE_UPDATE_POSITION";
    public static final String RISEORGEVENT_TYPE_UPDATE_PERSON = "RISEORGEVENT_TYPE_UPDATE_PERSON";

    public static final String RISEORGEVENT_TYPE_UPDATE_USER = "RISEORGEVENT_TYPE_UPDATE_USER";

    public static final String RISEORGEVENT_TYPE_DELETE_ORGANIZATION = "RISEORGEVENT_TYPE_DELETE_ORGANIZATION";
    public static final String RISEORGEVENT_TYPE_DELETE_DEPARTMENT = "RISEORGEVENT_TYPE_DELETE_DEPARTMENT";
    public static final String RISEORGEVENT_TYPE_DELETE_GROUP = "RISEORGEVENT_TYPE_DELETE_GROUP";

    public static final String RISEORGEVENT_TYPE_DELETE_POSITION = "RISEORGEVENT_TYPE_DELETE_POSITION";
    public static final String RISEORGEVENT_TYPE_DELETE_PERSON = "RISEORGEVENT_TYPE_DELETE_PERSON";

    public static final String RISEORGEVENT_TYPE_DELETE_USER = "RISEORGEVENT_TYPE_DELETE_USER";

    public static final String RISEORGEVENT_TYPE_GROUP_ADDPERSON = "RISEORGEVENT_TYPE_GROUP_ADDPERSON";
    public static final String RISEORGEVENT_TYPE_GROUP_REMOVEPERSON = "RISEORGEVENT_TYPE_GROUP_REMOVEPERSON";
    public static final String RISEORGEVENT_TYPE_GROUP_ORDER = "RISEORGEVENT_TYPE_GROUP_ORDER";

    public static final String RISEORGEVENT_TYPE_POSITION_ADDPERSON = "RISEORGEVENT_TYPE_POSITION_ADDPERSON";
    public static final String RISEORGEVENT_TYPE_POSITION_REMOVEPERSON = "RISEORGEVENT_TYPE_POSITION_REMOVEPERSON";
    public static final String RISEORGEVENT_TYPE_POSITION_ORDER = "RISEORGEVENT_TYPE_POSITION_ORDER";

    // 更新排序号
    public static final String RISEORGEVENT_TYPE_UPDATE_ORGANIZATION_TABINDEX = "RISEORGEVENT_TYPE_UPDATE_ORGANIZATION_TABINDEX";
    public static final String RISEORGEVENT_TYPE_UPDATE_DEPARTMENT_TABINDEX = "RISEORGEVENT_TYPE_UPDATE_DEPARTMENT_TABINDEX";
    public static final String RISEORGEVENT_TYPE_UPDATE_GROUP_TABINDEX = "RISEORGEVENT_TYPE_UPDATE_GROUP_TABINDEX";
    public static final String RISEORGEVENT_TYPE_UPDATE_POSITION_TABINDEX = "RISEORGEVENT_TYPE_UPDATE_POSITION_TABINDEX";
    public static final String RISEORGEVENT_TYPE_UPDATE_PERSON_TABINDEX = "RISEORGEVENT_TYPE_UPDATE_PERSON_TABINDEX";

    public static final String RISEORGEVENT_TYPE_SYNC = "RISEORGEVENT_TYPE_SYNC";
    public static final String RISEORGEVENT_TYPE_USER_SYNC = "RISEORGEVENT_TYPE_USER_SYNC";
    public static final String EVENT_TARGET_ALL = "ALL";

    public static final String ORG_TYPE = "ORG_TYPE";
    public static final String SYNC_ID = "SYNC_ID";

    // 是否递归
    public static final String SYNC_RECURSION = "SYNC_RECURSION";
    public static final Integer SYNC_NEEDRECURSION = 1;
    public static final Integer SYNC_DONTRECURSION = 0;

    public static final String ORG_MAPPING_PERSONSGROUPS = "PersonsGroups";
    public static final String ORG_MAPPING_POSITIONSPERSONS = "PositionsPersons";
    public static final String ORG_MAPPING_ROLESPERSONS = "RolesPersons";

    // 树类型
    // 组织机构树，显示机构，部门，用户组，角色，岗位，人员，人员链接
    public static final String TREE_TYPE_ORG = "tree_type_org";
    // 部门树 显示机构，部门
    public static final String TREE_TYPE_DEPT = "tree_type_dept";
    // 用户组树 显示机构，部门 用户组
    public static final String TREE_TYPE_GROUP = "tree_type_group";
    // 角色树 显示机构，部门 角色
    // public static final String TREE_TYPE_ROLE = "tree_type_role";
    // 岗位树 显示机构，部门 岗位
    public static final String TREE_TYPE_POSITION = "tree_type_position";
    // 人员树，显示机构，部门，人员
    public static final String TREE_TYPE_PERSON = "tree_type_person";

    // 组织机构类型
    public static final String ORG_TYPE_ORG_ENNAME = "Organization";
    public static final String ORG_TYPE_ORG_CNNAME = "\u7ec4\u7ec7\u673a\u6784";

    public static final String ORG_TYPE_DEPARTMENT_ENNAME = "Department";
    public static final String ORG_TYPE_DEPARTMENT_CNNAME = "\u90e8\u95e8";

    public static final String ORG_TYPE_GROUP_ENNAME = "Group";
    public static final String ORG_TYPE_GROUP_CNNAME = "\u7528\u6237\u7ec4";

    public static final String ORG_TYPE_POSITION_ENNAME = "Position";
    public static final String ORG_TYPE_POSITION_CNNAME = "\u5c97\u4f4d";

    public static final String ORG_TYPE_PERSON_ENNAME = "Person";
    public static final String ORG_TYPE_PERSON_CNNAME = "\u4eba\u5458";

    public static final Map<String, String> orgTypeMap = new HashMap<String, String>();

    static {
        orgTypeMap.put(ORG_TYPE_ORG_ENNAME, ORG_TYPE_ORG_CNNAME);
        orgTypeMap.put(ORG_TYPE_DEPARTMENT_ENNAME, ORG_TYPE_DEPARTMENT_CNNAME);
        orgTypeMap.put(ORG_TYPE_GROUP_ENNAME, ORG_TYPE_GROUP_CNNAME);
        orgTypeMap.put(ORG_TYPE_POSITION_ENNAME, ORG_TYPE_POSITION_CNNAME);
        orgTypeMap.put(ORG_TYPE_PERSON_ENNAME, ORG_TYPE_PERSON_CNNAME);
    }

}
